<script src="/styles/js/WdatePicker.js"></script>
<style type="text/css">
.ui-datepicker-calendar {
    display: none;
    }
</style>
<div class="mnav1">
	<div class="m_nav">
		<div class="nav_left">
			<em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
		</div>
	</div>
</div>

<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>

<form enctype="multipart/form-data" action="/maozhua/import-excel" method="post">
	<div>请先<a href="/reports/template-export" style="color:blue;">下载月度数据报表模板</a>编辑后上传文件</div>
	<div>
		<span>请选择月份：<input  id="Datepicker" name="year_month" type="text" autocomplete="off" style="width:257.95px;"/></span>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span>选择要上传的文件：<input type="file" name="myfile"></span>
        <input type="submit" value="上传文件" />
	</div>
	<div>
		注：上传的表格不能超过8M的大小且必须为后缀名为“.xls”或“（2007或以上版本的）.xlsx”结尾的Excel文件。
	</div>
</form>
<script type="text/javascript">
$(function() {
         $('#Datepicker').datepicker({
                 changeMonth: true,
                 changeYear: true,
                 dateFormat: 'yyyy-mm',
                 showButtonPanel: true,
                 onClose: function(dateText, inst) {
					var month = $("#ui-datepicker-div .ui-datepicker-month option:selected").val();//得到选中的月份值
					var fact_month=parseInt(month)+1;
					if(fact_month < 10){
						fact_month= '0'+fact_month;
					}
					var year = $("#ui-datepicker-div .ui-datepicker-year option:selected").val();//得到选中的年份值
					$('#Datepicker').val(year+'-'+fact_month);//给input赋值，其中要对月值加1才是实际的月份
                 }
             });
         });         

</script>
